package com.wedo.mall.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by lxy on 2017/6/19.
 */

public class Agent implements Parcelable {
    /**
     * id : 101
     * user_id: 101 环信聊天ID
     * logo : /Static/Public/Shop/images/storeimg.png
     * agent_name : 东源堂新天地店
     * address : 阳光大道221号东源堂新天地店
     * longitude : 113.3894200000
     * latitude : 23.1259200000
     * distance : 1.4
     * star : 4 店铺评分
     */

    public String id;
    public String logo;
    public String agent_name;
    public String address;
    public String longitude;
    public String latitude;
    public String distance;
    public String agent_phone;
    public int star;
    public int is_attention = 0;//是否已关注（0：否，1：是）

    public String user_id;


    /**我的收藏商店用*/
    public String agent_id;
    public String meter;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.logo);
        dest.writeString(this.agent_name);
        dest.writeString(this.address);
        dest.writeString(this.longitude);
        dest.writeString(this.latitude);
        dest.writeString(this.distance);
        dest.writeInt(this.star);
        dest.writeInt(this.is_attention);
        dest.writeString(this.agent_id);
        dest.writeString(this.meter);
        dest.writeString(this.user_id);
    }

    public Agent() {
    }

    protected Agent(Parcel in) {
        this.id = in.readString();
        this.logo = in.readString();
        this.agent_name = in.readString();
        this.address = in.readString();
        this.longitude = in.readString();
        this.latitude = in.readString();
        this.distance = in.readString();
        this.star = in.readInt();
        this.is_attention = in.readInt();
        this.agent_id = in.readString();
        this.meter = in.readString();
        this.user_id = in.readString();
    }

    public static final Parcelable.Creator<Agent> CREATOR = new Parcelable.Creator<Agent>() {
        @Override
        public Agent createFromParcel(Parcel source) {
            return new Agent(source);
        }

        @Override
        public Agent[] newArray(int size) {
            return new Agent[size];
        }
    };
}
